/**
 * Licensed to the Apache Software Foundation （ASF） under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * （the "License"）； you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * <p>
 * https://www.q3z3.com
 * QQ : 939313737
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.platform.modules.sys.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.platform.common.web.domain.BaseEntity;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 系统用户表实体类
 * </p>
 */
@TableName("sys_user")
@Data
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId
    private Long id; // 主键
    private String username; // 用户名
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password; // 密码
    private String nick; // 昵称
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String salt; // 盐
    private String remark; // 描述
    private String status; // 状态Y=启用N=禁用
    private Long roleId; // 角色ID
    private String userType; // 用户类型
    @TableField(exist = false)
    private String roleName; // 角色名称
    @TableField(exist = false)
    private String roleCode; // 角色编码
    @TableField(exist = false)
    private Date startTimestamp;
    @TableField(exist = false)
    private String host;
    @TableField(exist = false)
    private String sessionId;
    @TableField(exist = false)
    private String runTime;
    @TableField(exist = false)
    private List<String> permissions;

}
